package com.example.natilocationsearch;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class UCLocationSearch extends Activity {
	private EditText addressNameSearchText;
	private Button searchBtn; 
	private Button addBtn; 
	public Intent addAddressIntent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_uclocation_search);
		addressNameSearchText = (EditText) findViewById(R.id.addressNameSearchText);
		searchBtn = (Button) findViewById(R.id.searchBtn); 
		addBtn = (Button) findViewById(R.id.addBtn); 
		
		 addAddressIntent = new Intent(this, UCLocationAdd.class);
		
		// Create Listeners for Buttons
		OnClickListener searchBtnList = new OnClickNicknameSearch(); 
		OnClickListener addBtnList = new OnClickAddScreen(); 
		
		//Connect Listener to Buttons
		searchBtn.setOnClickListener(searchBtnList); 
		addBtn.setOnClickListener(addBtnList); 
	}
	
	class OnClickNicknameSearch implements OnClickListener{

		@Override
		public void onClick(View arg0) {
		
		
			
		}
		
		
	}
	
	class OnClickAddScreen implements OnClickListener {

		@Override
		public void onClick(View v) {
			startActivity(addAddressIntent);
		}
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.uclocation_search, menu);
		return true;
	}
}

	